package neanda.engine;

import neanda.engine.core.EngineController;
import neanda.engine.core.Game;
import neanda.engine.core.window.Window;

/**
* @param parameter
*  <br>window = Startet die Engine im Fenstermodus
*  <br>log = Startet das Engine Fenster im Logmodus
*/
public class NeandaEngine
{
	private static boolean windowed = false;
	private static boolean loged = false;;
	
	public static void main(String[] parameter)
	{
		for(String param:parameter)
		{
			if(param.equals("window"))
			{
				windowed = true;
			}
			else if(param.equals("log"))
			{
				loged = true;
			}
			else
			{
				System.err.println("Unbekannter Engine Parameter!");
				System.exit(0);
			}
		}
		
		if(windowed)
		{
			EngineController.setWindow(new Window(Window.VIEW_MODE_WINDOW, loged));
		}
		else
		{
			EngineController.setWindow(new Window(Window.VIEW_MODE_FULLSCREEN, loged));
		}
		new Game();
		new Thread(new EngineController()).run();
		
	}
}
